/*关闭评论框*/


function saveOrderComment(){

    document.getElementById("order-comment").style.display="none";

    document.getElementById("webpos_overlay").style.display="none";
}



/*订单确认页面倒退按钮*/
function showCategory(){

    document.getElementById("settings_area").style.display="none";
    document.getElementById("settings_area").style.zIndex=1;
    
    
    document.getElementById("reports_area").style.display="none";
    document.getElementById("reports_area").style.zIndex=1;
    
            
    document.getElementById("cashdrawer_area").style.display="none";
    document.getElementById("cashdrawer_area").style.zIndex=1;
    
                    
    document.getElementById("orders_area").style.display="none";
    document.getElementById("orders_area").style.zIndex=1;
    
    document.getElementById("holded_orders_section").style.display="none";
    document.getElementById("holded_orders_section").style.zIndex=1;
    
      
      //$('#order_info_wp').hide();
      $('#order_info').css('width','0px')
      $('#order_info').addClass('orderHide');
      $('#total-right').css('float','right');
      $('#product-left').show();

      $('#continue_select_product').addClass('hide');
      $('#customer_loader').removeClass('hide');
      
      $('#bt_hold_order').show();
      $('#bt_checkout').show();
      $('#bt_checkout').css('width','66%');
      $('#grand_total_wp_show').hide(); //hjl 隐藏总计
      $("#add-discount").show();

      //hjl 关闭打开购物车遮罩 ,显示删除按钮

      $('#webpos_cart_overlay').addClass('hide');
      $('#webpos_cart > div').find('.delete ').show();


}

//hjl  订单完成页面验证邮件
function sendOrderToCustomerViaEmail(){
  
  var email=$('#success_customerEmail').val();

  var myReg=/^[a-zA-Z0-9_-]+@([a-zA-Z0-9]+\.)+(com|cn|net|org)$/gi;
   if(!myReg.test(email)){
     //验证失败
    
   
     msg('danger','Error:无效的邮件地址');
   
  }else{
    //验证成功
   
   
    msg('success','发送成功');
 
  }

}



